home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / util_printer.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-10-24  |  3.6 KB  |  98 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef PRINTERUTIL_H
  8. #define PRINTERUTIL_H
  9.  
  10.  
  11. #include <QString>
  12. #include <QMap>
  13.  
  14. #include "scribusapi.h"
  15. #include "scribusstructs.h"
  16.  
  17. class QStringList;
  18.  
  19. class SCRIBUS_API PrinterUtil
  20. {
  21.     public:
  22.         PrinterUtil() {};
  23.         ~PrinterUtil() {};
  24.         QStringList static getPrinterNames();
  25.  
  26. #if defined(_WIN32)
  27.         /**
  28.          * @brief Get the defaults settings for a specified printer (Windows only)
  29.          *
  30.          * This function retrieve the default settings for a specified
  31.          * printer and return true on success
  32.          * This function is available only on Windows systems
  33.          *
  34.          * @param printerName the printer name
  35.          * @param devModeA an array which will store the DEVMODE structure with printer settings
  36.          * @return true if default settings were successfully retrieved.
  37.          */
  38.         static bool getDefaultSettings( QString printerName, QByteArray& devModeA );
  39.         /**
  40.          * @brief Initialize print options dialog box settings (Windows only) 
  41.          *
  42.          * This function initialize the print options dialog box for a specified
  43.          * printer and return true on success
  44.          * This function is available only on Windows systems
  45.          *
  46.          * @param printerName the printer name
  47.          * @param devModeA an array storing the DEVMODE structure for the specified printer
  48.          * @return true if default settings were successfully retrieved.
  49.          */
  50.         static bool initDeviceSettings( QString printerName, QByteArray& devModeA );
  51. #endif
  52.         /**
  53.          * @brief Get the 4 minimum page margins for a certain paper size on the given printer
  54.          *
  55.          * @param printerName the printer name 
  56.          * @param pageSize the page size to get the margins for
  57.          * @param ptsTopMargin the page's top margin in points
  58.          * @param m_ptsBottomMargin the page's bottom margin in points
  59.          * @param m_ptsLeftMargin the page's left margin in points
  60.          * @param m_ptsRightMargin the page's right margin in points
  61.         \retval bool true on success
  62.          */
  63.         static bool getPrinterMarginValues( const QString& printerName, const QString& pageSize, double& ptsTopMargin, double& m_ptsBottomMargin, double& m_ptsLeftMargin, double& m_ptsRightMargin);
  64.         /**
  65.          * @brief Get default print engine for a specific printer
  66.          * @param printerName the printer name
  67.          * @param toFile if file printing is planned
  68.          */
  69.         static PrintEngine getDefaultPrintEngine(const QString& printerName, bool toFile);
  70.         /**
  71.          * @brief Get print engines supported by a specific printer
  72.          * @param printerName the printer name
  73.          * @param toFile if file printing is planned
  74.          */
  75.         static PrintEngineMap getPrintEngineSupport(const QString& printerName, bool toFile);
  76.         /**
  77.          * @brief Check if a print engine is supported by a specific printer
  78.          * @param printerName the printer name
  79.          * @param engine the print engine for which support is to be checked
  80.          * @param toFile if file printing is planned
  81.          */
  82.         static bool checkPrintEngineSupport(const QString& printerName, PrintEngine engine, bool toFile);
  83.         /**
  84.          * @brief Check if a specified printer supports postscript input
  85.          *
  86.          * On Windows, the function test postscript support for a specified printer
  87.          * and return true if ps is supported
  88.          * On non Windows systems, the function always return true
  89.          *
  90.          * @param printerName the printer name
  91.          * @return true is printer support postscript, false otherwise.
  92.          *
  93.          */
  94.         static bool isPostscriptPrinter( QString printerName );
  95. };
  96.  
  97. #endif // DRUCK_H
  98.